<template>
    <div class="clinicPayment">
        <!-- clinicPayment -->
        <header>
            <row>
                <col>
                    <div class="margin-up-down">
                        <span>日期</span>
                        <DatePicker type="date" v-model="getParams.startDate" style='width:120px;'></DatePicker>
                    </div>
                    <div class="margin-up-down">
                        <Button type='success' @click='query(1)'>对账查询</Button>
                    </div>
                    <div style="margin: 0 0 0 20px" class="margin-up-down">
                        <upload
                            multiple
                            :action="uploadUrl"
                            :on-success="handleSuccess"
                            :headers="fromData"
                        >
                            <Button type="primary">上传微信账单</Button>
                        </upload> 
                    </div> 
                </col>
            </row>
        </header>
        <div class="table-container">
          <div class="table-wrapper system-table">
            <Table 
                stripe 
                :row-class-name="rowClassName"
                :highlight-row="true"
                @on-current-change="currentChangeS"
                @on-row-click="rowClick" 
                style="width: 100%;" 
                height="580"
                disabled-hover
                :columns="columns1" 
                :data="systemData"
            ></Table>
          </div>
          <div class="table-wrapper entry-table">
            <Table 
                stripe 
                :row-class-name="rowClassName"
                :highlight-row="true"
                @on-current-change="currentChangeE"
                @on-row-click="rowClick" 
                style="width: 100%;"  
                height="580" 
                disabled-hover
                :columns="columns2" 
                :data="enterData"
            ></Table>
          </div>
        </div>
        <div class="page">
<!--            <Page :total="count" :current='pageNo' :page-size="pageSize" show-total show-elevator @on-change="pageChange"/>-->
        </div>
        <Modal v-model="clinicStatus" footer-hide width='800' :mask-closable="false" :closable="false">
            <!-- 自动对账 -->
            <div v-show='buttonStatus == 1' style='padding:30px 10px;'>
                <h1 style='text-align:center;'>自动对账提示</h1>
                <p style='font-size:16px;margin:10px 0;text-align:center;'>自动对账将下载医院HIS数据，自动完成对账，异常数据可手动调整处理。</p>
                <!-- 进度条 -->
                <!-- <Progress :percent="progressStart" status="active" style='margin:10px 0;' v-show='autoLoad' >
                </Progress> -->
                <div style='width:400px;margin:0 auto;text-align:center;'>
                    <Button type='primary' @click='ok' :disabled='DZdisabled'>确定对账</Button>
                    <!-- <Button @click='cancelPayment'>取消对账</Button> -->
                    <Button @click='cancel'>返回</Button>
                </div>
            </div>
            <!-- 手动对账 -->
            <div v-show='buttonStatus == 2' style='padding:30px 10px;'>
                <h1 style='text-align:center;margin-bottom:10px;'>手动调整</h1>
                <div>
                    <span>交易流水号：</span>
                    <Input v-model.trim="manualParams.modalSearchKey" placeholder="请输入交易流水号查询" style="width: 200px" />
                    <!-- <Button type='primary' @click='searchSerialNumber'>查询</Button> -->
                </div>
                <div style='margin:20px 0;display:flex;
                flex-direction:row;justify-content:space-around;'>
                    <Card style='width:200px;'>
                        <p slot="title" style='text-align:center;'>支付平台状态：</p>
                        <p style='text-align:center;'>{{manualParams.PlatformStatus}}</p>
                    </Card>
                    <Card style='width:200px;margin:0 10px;'>
                        <p slot="title" style='text-align:center;'>互联网平台状态：</p>
                        <Select v-model="manualParams.interPlatformStatus" style="width:130px" >
                            <Option
                                v-for="(item,index) in stautParams"
                                :value="index"
                                :key="index"
                                style='text-align:center'
                            >{{ item }}</Option>
                        </Select>
                    </Card>
                    <!-- <Card style='width:200px;'>
                        <p slot="title" style='text-align:center;'>医院HIS交易状态：</p>
                        <Select v-model="manualParams.hisPlatformStatus" style="width:130px" >
                            <Option
                                v-for="(item,index) in stautParams"
                                :value="index"
                                :key="index"
                                style='text-align:center'
                            >{{ item }}</Option>
                        </Select>
                    </Card> -->
                </div>
                <div style='width:400px;margin:0 auto;text-align:center;'>
                    <!-- <Button type='primary' @click='changePlatform'>更改平台状态</Button> -->
                    <Button type='primary' @click='changeHisStatus'>更改医院HIS状态</Button>
                    <Button @click='cancel'>取消</Button>
                </div>
            </div>
        </Modal>
    </div>
</template>
<script>
import api from "@/api/commonApi";
import { DatePicker, TimePicker, Card, Progress } from 'view-design'
// 诊间交费
export default {
    components: {
        DatePicker,
        TimePicker,
        Card,
        Progress
    },
    data () {
        return {
            ORDER_TYPE_ENUM:[
              {code:0,name:'健康咨询'},
              {code:1,name:'巡诊'},
              {code:2,name:'复诊'},
              {code:3,name:'续方'},
              {code:4,name:'用药咨询'},
              {code:5,name:'购药'},
              {code:6,name:'预约挂号'},
              {code:7,name:'家医签约'},
              {code:8,name:'远程门诊'},
              {code:9,name:'直播'},
              {code:10,name:'点播'},
              {code:11,name:'诊间缴费'},
              {code:12,name:'充值'},
              {code:13,name:'住院押金缴费'},
              {code:14,name:'院后随访'},
              {code:15,name:'外延处方'},
              {code:16,name:'远程会诊'},
              {code:17,name:'病历复印'},
              {code:18,name:'检查检验预约'},
              {code:19,name:'检查预约'},
              {code:20,name:'检验预约'},
              {code:21,name:'体检预约'},
              {code:22,name:'互联网缴费'},
              {code:23,name:'手术预约'},
              {code:30,name:'线上就诊'}
            ],
            uploadUrl : "/api"+api.statFinanceWechatBill,
            // 头部参数
            getParams: {
                // 开始时间
                startDate: '',
                startTime: "00:00",
                // 结束时间
                endDate: "",
                endTime: "",
                // 查询条件
                searchKey:"",
                // 异常
                single : false,
            },
            // 列表数据
            columns1: [
                {
                    key: "isum",
                    title: "排序",
                    align: "center",
                    width: 60,
                    render: (h, params) => {
                        let isum = params.index + 1
                        return isum
                    }
                },
                {
                    key: "tradeType",
                    title: "交易类型",
                    align: "center",
                    width: 100,
                    render: this.formatTradeName
                },
                {
                    key: "businessType",
                    title: "业务类型",
                    align: "center",
                    width: 100,
                    render: this.formatTypeName
                },
                {
                    key: "orderNo",
                    title: "订单号",
                    align: "center",
                    width: 200,
                },
                {
                    key: "feeType",
                    title: "费别",
                    align: "center",
                    width: 200,
                },
                // {
                //     key: "wholeAccountMoney",
                //     title: "统筹金额",
                //     align: "center"
                // },
                // {
                //     key: "personalAccountMoney",
                //     title: "个人帐户金额",
                //     align: "center"
                // },
                {
                    key: "wechatMoney",
                    title: "微信金额",
                    align: "center",
                    width: 200,
                },
                {
                    key: "sumsMoney",
                    title: "总金额",
                    align: "center",
                    width: 200,
                },
                {
                    key: "Action",
                    title: "操作",
                    align: "center",
                    width: 80,
                    fixed: 'right',
                    render: (h, params) => {
                        if(params.row.danger){
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    on: {
                                        click: () => {
                                            this.onSquareAccounts(params)
                                        }
                                    }
                                }, '平账')
                            ]);
                        }else{
                            return '-'
                        }
                    }
                }
            ],
            columns2: [
                {
                    key: "isum",
                    title: "排序",
                    align: "center",
                    width: 60,
                    render: (h, params) => {
                        let isum = params.index +1
                        return isum
                    }
                },
                {
                    key: "transactionTime",
                    title: "交易时间",
                    align: "center",
                    width: 100,
                },
                {
                    key: "wechatOrderNumber",
                    title: "微信支付单号",
                    align: "center",
                    width: 260,
                },
                {
                    key: "merchantOrderNumber",
                    title: "订单号",
                    align: "center",
                    width: 200,
                },
                {
                    key: "tradingScenario",
                    title: "交易场景",
                    align: "center",
                    width: 100
                },
                {
                    key: "transactionStatus",
                    title: "交易状态",
                    align: "center",
                    width: 100
                },
                {
                    key: "transactionAmount",
                    title: "交易金额(元)",
                    align: "center",
                    width: 100
                }
            ],
            systemData: [],
            enterData: [],
            // 分页数据
            count: 0,
            pageNo: 1,
            pageSize: 10,
            // 弹窗状态
            clinicStatus: false,
            // 单个平台状态列表
            statusList: ['失败','交易成功','退费', '未获取到状态'],
            //支付渠道
            Channels:['微信','支付宝','线下支付','就诊卡号'],
            // 点击来源
            buttonStatus: 1,
            orderStatusList: [
                {
                    name: "支付成功",
                    id:'1'
                },
                {
                    name: "未支付",
                    id:'2'
                },
                {
                    name: "支付失败",
                    id:'3'
                },
                {
                    name: "支付取消",
                    id:'4'
                },
                {
                    name: "已退费",
                    id:'5'
                },
            ],
            // 订单对账状态
            manualParams: {
                // 平台状态
                PlatformStatus: '已支付',
                // 互联网平台状态
                interPlatformStatus: "",
                // HIS状态
                hisPlatformStatus: "",
                // 弹窗查询流水号
                modalSearchKey:"",
                // id
                transId:""
            },
            stautParams: ['未对账','对账成功','未获取到数据','金额不符','状态不符'],
            // // 自动对账状态
            autoLoad:false,
            // 进度条
            progressStart: 0,
            uuid :'',
            DZdisabled: false,
            highlightedOrderNumber: null, // 用于记录应该被高亮的orderNumber
            highlightRow: null, // 用于记录应该被高亮的行
            oldHighlightRow: null, // 用于记录应该被高亮的行

        }
    },
    computed: {

    },
    created () {
        let breadList = [
            { path: "/index", title: "首页" },
            {
                path: "/index/operation/clinicPayment",
                title: "互联网医院"
            },
            {
                path: "/index/internetHospital/clinicPayment/list",
                title: "诊间缴费对账"
            }
        ];
        this.getParams.startDate = this.GetDate(0);
        this.getParams.endDate = this.GetDate(0);
        let date = new Date();
        this.getParams.endTime = date.getHours() + ':' + date.getMinutes()
        this.$emit("changeBreadList", breadList);
    },
    mounted () {
        this.loadingCardRechargeList(this.pageNo)
    },
    methods: {
        onSquareAccounts(e){
            console.log(e)
            this.$Modal.confirm({
                title: '确认操作',
                content: '确认对账吗？',
                onOk: () => {
                    let url = api.statFinanceHandleError;
                    let param = {
                        orderNumber: e.row.orderNo?e.row.orderNo:this.enterData[e.index].merchantOrderNumber,
                        tradeType: e.row.tradeType?e.row.tradeType:this.enterData[e.index].transactionStatus == '全额退款'?2:1
                    }
                    this.$axios.post(url, param).then(response => {
                        this.query()
                    })
                },
                onCancel: () => {
                    console.log(123)
                }

            });

        },
        currentChangeS(row){
            console.log(arguments)
            if(this.oldHighlightRow != null){
                let index = this.oldHighlightRow 
                delete this.systemData[index].highlight
                delete this.enterData[index].highlight
                this.systemData.splice(index, 1, this.systemData[index])
                this.enterData.splice(index, 1, this.enterData[index])
            }

            let index = this.systemData.findIndex(item => item.orderNo == row.orderNo)
            this.oldHighlightRow = index
            this.systemData[index].highlight = true
            this.enterData[index].highlight = true
            this.systemData.splice(index, 1, this.systemData[index])
            this.enterData.splice(index, 1, this.enterData[index])
        },
        currentChangeE(row){
            if(this.oldHighlightRow != null){
                let index = this.oldHighlightRow 
                delete this.systemData[index].highlight
                delete this.enterData[index].highlight
                this.systemData.splice(index, 1, this.systemData[index])
                this.enterData.splice(index, 1, this.enterData[index])
            }

            let index = this.enterData.findIndex(item => item.merchantOrderNumber == row.merchantOrderNumber)
            this.oldHighlightRow = index
            this.systemData[index].highlight = true
            this.enterData[index].highlight = true
            this.systemData.splice(index, 1, this.systemData[index])
            this.enterData.splice(index, 1, this.enterData[index])
        },
        rowClick(row){
            let systemTableEl = document.querySelector(".system-table .ivu-table-body")
            
            let entryTableEl = document.querySelector(".entry-table .ivu-table-body")
            entryTableEl.scrollTop = systemTableEl.scrollTop
        },
        rowClassName (row, index) {
            if (row.highlight) {
                return 'ivu-table-row-highlight'
            }

            if (row.danger) {
                return 'row-danger'
            } else {
                return ''
            }
        },
        formatTradeName(h, params){
            let row = params.row;
            let typeName = "";
            //找到名字
            if(row.tradeType == 1){
                typeName = "支付";
            }else if(row.tradeType == 2){
                typeName = "退款";
            }else{
                if(row.tradeType){
                    typeName = "未知类型-"+row.tradeType;
                }else{
                    typeName = ""
                }
                
            }

            return typeName
        },
        formatTypeName(h, params) {
          let row = params.row;
          let typeName = "";
          //找到名字
          for(let i=0;i<this.ORDER_TYPE_ENUM.length;i++){
            if( this.ORDER_TYPE_ENUM[i].code == row.businessType){
              typeName = this.ORDER_TYPE_ENUM[i].name;
              break;
            }
          }
          if(typeName == "" && row.businessType){
            if(row.businessType){
                typeName = "未知类型-"+row.businessType;
            }else{
                typeName = ""
            }
          }
          return typeName
        },
        query (pageNo) {
            // alert("日结账单");
          this.pageNo = pageNo
          let url = api.statFinanceStatement;
          let param = {
            pageNo: this.pageNo,
            pageSize: this.pageSize,
            startTime: this.getData(this.getParams.startDate),
            endTime: this.getData(this.getParams.endDate)
            // hospitalId: sessionStorage.getItem("hospitalId")
          }
          this.$axios.post(url, param).then(response => {
            let systemData = response.data.object.statement
            let enterData = response.data.object.wechat

            for(let i = 0; i < systemData.length; i++) {
                let index = response.data.object.wechat.findIndex((item) => {
                    return systemData[i].orderNo == item.merchantOrderNumber
                })

                if (index != -1) {
                    let item = JSON.parse(JSON.stringify(response.data.object.wechat[index]))

                    if(item.transactionAmount != systemData[i].wechatMoney){
                        systemData[i].danger = true
                        item.danger = true
                    }

                    enterData.splice(i, 0, item)
                    if(i <= index){
                        enterData.splice(index + 1, 1)
                    }else{
                        enterData.splice(index, 1)
                    }
                    
                }else{
                    systemData[i].danger = true
                    enterData.splice(i, 0, {danger: true})
                }
            }

            let datax = response.data.object.wechat.length - systemData.length;
            if(datax > 0){
                let len = systemData.length
                for(let i = len; i < enterData.length; i++) {
                    let item = JSON.parse(JSON.stringify(enterData[i]))
                    item.danger = true
                    enterData.splice(i, 1, item)
                    systemData.splice(i, 0, {danger: true})
                }
            }
            
            
            this.systemData = systemData;
            this.enterData = enterData;
            
          })
        },
        // 分页器改变
        pageChange (index) {
            this.pageNo = index;
            this.query(index)
        },
        // 自动对账确定按钮
        ok () {
            this.autoLoad = true
            this.autorecon();
        },
        // 自动对账
        autorecon () {
            this.DZdisabled = true
            let url = api.checkingCheck
            let params = {
                // pageNo: this.pageNo,
                // pageSize: this.pageSize,
                startTime: this.getData(this.getParams.startDate) + ' ' + this.getParams.startTime,
                endTime: this.getData(this.getParams.endDate) + ' ' + this.getParams.endTime,
                status: Number(this.getParams.single),
                businessSources: 22,
                // businessSources: 11,
            }
            this.$axios.post(url, params,{timeout: 1000 * 60 * 2}).then(res => {
                if (res.data.code == 1) {
                    let ret = res.data.object;
                    // this.uuid = ret.key
                    // this.progressbord()
                    this.DZdisabled = false
                    this.clinicStatus = false
                    this.$Message.success('对账成功')
                    this.loadingCardRechargeList(1)
                    console.log('自动对账',res);
                } else if (res.data.code == 2) {
                   this.$Message.info("正在对账,请勿重复对账!")
                } else {
                    this.$Message.error(res.data.message)
                    this.DZdisabled = false
                }
            })
        },
        // 请求进度条
        progressbord () {
            let url = api.speedofprogress;
            let params = {
                uuid: this.uuid
            }
            this.$axios.post(url, params).then(res => {
                if(res.data.success) {
                    let ret = res.data.object;
                    console.log("进度条", ret);
                    let err = Boolean(ret.ERROR_COUNT) ? Number(ret.ERROR_COUNT) : 0
                    let start = Number(ret.EXECUTE_START)
                    let count = Boolean(ret.EXECUTE_COUNT) ? Number(ret.EXECUTE_COUNT) : 0
                    let currentTotal = err + count
                    console.log('currentTotal: ', currentTotal);

                    // 进度条参数
                    let progressEnd = Number(ret.TOTAL_COUNT) || 0
                    console.log('progressEnd: ', progressEnd);
                    let progressStart = parseInt((currentTotal * 100) / progressEnd);
                    console.log('progressStart: ', progressStart);

                    this.progressStart = progressStart
                    if(start != 1) {
                        return ""
                    }
                    // 当已对账数量+异常数据 = 总数的时候停止递归然后调用取消对账接口
                    if(currentTotal == ret.TOTAL_COUNT) {
                        this.$axios.post(api.deleteredis, {
                            uuid: this.uuid
                        }).then(res => {
                            if (res.data.success) {
                                this.clinicStatus = false;
                                this.autoLoad = false;
                                this.progressStart = 100
                                this.loadingCardRechargeList(this.pageNo);
                                this.$Message.success("对账成功")
                            }
                        })
                        return ""
                        // 不等于总数时继续递归调用进度条接口
                    } else if(currentTotal != ret.TOTAL_COUNT) {
                        console.log("继续对账");
                        if (this.autoLoad) {
                            this.progressbord();
                        }
                    }
                }
            })
        },
        // 点击弹窗取消,初始化弹窗里的值
        cancel () {
            this.clinicStatus = false
            //支付状态
            this.manualParams.PlatformStatus = ''
            this.manualParams.interPlatformStatus = ''
            this.manualParams.hisPlatformStatus = ''
            this.manualParams.modalSearchKey = ''
        },
        // 取消对账
        cancelPayment () {
            if(!this.uuid) {
                this.clinicStatus = false;
                return ""
            }
            this.$axios.post(api.deleteredis, {
                uuid: this.uuid
            }).then(res => {
                if (res.data.success) {
                    this.$Message.success ("取消对账成功");
                    this.clinicStatus = false
                    this.autoLoad = false
                }
            })
        },
        // 对账功能逻辑
        cliniction (status, row) {
            if(this.getParams.startDate === '' || this.getParams.startDate === null){
                this.$Message.error("请选择对账开始时间")
            }else{
                this.buttonStatus = status
                this.DZdisabled = false
                this.clinicStatus = true
                if(status == 2) {
                    console.log('row', row);
                    this.manualParams.PlatformStatus = row.checkingStatus == 1 ? '已对账' : "未对账";
                    // 互联网平台状态
                    this.manualParams.interPlatformStatus = row.platformThridStatus
                    // HIS状态
                    this.manualParams.hisPlatformStatus = row.platformHisStatus
                    // id
                    this.manualParams.transId = row.transId
                    console.log(this.manualParams);
                }
            }
        },
        //更改平台状态
        changePlatform () {
            console.log('更改平台状态');
            let url = api.updatestatus
            let params = {}
            return ""
            this.$axios.post(url, params).then(res => {
                if (res.data.success) {
                    // this.$Message.info('由于对账信息较多,请等待5-10分钟重新查看!');
                } else {
                    this.$Message.error("更改平台状态失败")
                }
                this.clinicStatus = false
            })
        },
        // 查询账单流水号
        searchSerialNumber () {
            let url = api.querybyserialnumber;
            let params = {
                serialNumber: this.manualParams.modalSearchKey
            }
            console.log(params);
            // return ""
            this.$axios.post(url,params).then(res => {
                if(res.data.success) {
                    let ret = res.data.object;
                    this.cliniction(2,ret)
                    console.log(ret);
                }
            })
        },
        //更改His平台状态
        changeHisStatus () {
            console.log('更改His平台状态');
            let url = ''
            let params = {}
            return ""
            this.$axios.post(url, params).then(res => {
                if (res.data.success) {

                } else {
                    this.$Message.error("更改His平台状态失败")
                }
                this.clinicStatus = false
            })
        },
        // 加载页面列表数据
        loadingCardRechargeList (pageNo) {
            /*
                加载页面列表对账信息
            */
            this.pageNo = pageNo
            let url = api.checkingPage
            let startTime = this.getData(this.getParams.startDate) + ' ' + this.getParams.startTime;
            let endTime = this.getData(this.getParams.endDate) + ' ' + this.getParams.endTime;
            let query = this.getParams.searchKey.trim();
            let params = {
                pageNo: pageNo,
                pageSize: this.pageSize,
                startTime: startTime ? startTime : '',
                endTime: endTime ? endTime : '',
                status: Number(this.getParams.single),
                businessSources: 11,
            }
            if (Boolean(this.getParams.searchKey)) {
                params.query = this.getParams.searchKey.trim();
            } else {
                params.query = ''
            }
            if(this.getParams.startDate === '' || this.getParams.startDate === null){
                delete params.startTime
            }
            if(this.getParams.endDate === '' || this.getParams.endDate === null){
                delete params.endTime
            }
            console.log('诊间交费参数', params);
            this.$axios.post(url,params).then(ress => {
                if(ress.data.success) {
                    let ret = ress.data.object;
                    this.count = ret.total
                    console.log(ret);
                    if(ret.records){
                        ret.records.forEach((item, index) => {
                            item.isum = this.addZeros(index)
                        })
                        this.systemData = ret.records
                    } else {
                        this.systemData = []
                    }
                } else {
                    this.$Message.info("请确认当前账号是否绑定机构")
                }
            })
        },
        // 第一个个表格显示异常数据
        firstRowClassName (row, index) {
            if(Number(row.checkingStatus) == 0) {
                return ''
            } else if (row.tradingChannels >= 0) {
                // console.log('row.tradingChannels', row.tradingChannels)
                if(row.tradingChannels == 3) {
                    // 当支付渠道为就诊卡时只使用 支付平台与His对账的状态区分显示样式
                    if(row.platformHisStatus != 1) {
                        return 'demo-error-row';
                    } else {
                        return 'demo-success-row'
                    }
                    // 支付渠道为其他状态时 使用三个对比状态进行区分显示样式
                } else if(row.platformHisStatus != 1 || row.thirdHisStatus != 1 || row.platformThirdStatus != 1) {
                    console.log('hhhhhhhhhhhhhh')
                    return 'demo-error-row';
                }
            } else if(Number(row.checkingStatus) == 1) {
                return 'demo-success-row'
            }
            return '';
        },
        secondRowClassName(row, index){
          console.log('secondRow============',row)
          // 如果当前行的 orderNo 与需要高亮的 orderNo 匹配，则返回高亮类名

          if (row.merchantOrderNumber == this.highlightedOrderNumber) {
            console.log(this.highlightedOrderNumber)
            console.log(row.merchantOrderNumber)
            return 'highlight-row';
          }
          return '';
        },
        // 转换日期格式
        getData(data){
            let datas = new Date(data)
            var curr_date = datas.getDate();
            var curr_month = datas.getMonth() + 1;
            var curr_year = datas.getFullYear();
            function add(num){
                if(Number(num)<10) {
                    return '0' + num
                }
                return num
            }
            return curr_year + "-" + add(curr_month)+'-' + add(curr_date)
        }
    }
};
</script>

<style lang="less" scoped>
.clinicPayment {
    width: calc(100%);
    padding: 10px 30px;
    margin: 0 auto;
    background: #fff;
    .margin-up-down {
        display: inline-block;
        margin-top: 10px;
    }
    .page{
        text-align: center;
        margin-top: 20px;
    }
}
</style>
<style>
.row-danger{
    background-color: #f8d7da !important;
    
}
.row-danger .ivu-table-column-center{
    background-color: #f8d7da !important;
}
.ivu-table .demo-error-row td{
    color: red;
}
.ivu-table .demo-error-row td a{
    color:red
}
.ivu-table .demo-success-row td{
    color: #2b85e4;
}
.ivu-table .demo-success-row td a{
    color:#2b85e4
}
.table-container{
  width: 100%;
  height: 600px;
  display: flex;
  /*justify-content: space-between; !* 可选，根据需要调整子元素之间的间距 *!*/
}
.table-wrapper{
   /* flex: 1;让每个表格容器都尽可能占据等量的空间 */
  /* 如果需要，可以添加一些内边距或边框 */
  padding: 10px;
  border: 0px solid #ccc;
  overflow-y: auto; /* 如果需要滚动条 */
  width: 50%;
  height: 600px; /* 设置固定高度以启用滚动条 */
  overflow: auto;
}
.table-wrapper tr{
  height: 60px;
}
.highlight-row {
  /* 定义你的高亮样式 */
  background-color: yellow;
}
</style>
